Left Termination of the query pattern qs_in_2(g, a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

qs([], []).
qs(.(X, Xs), Ys) :- ','(part(X, Xs, Littles, Bigs), ','(qs(Littles, Ls), ','(qs(Bigs, Bs), app(Ls, .(X, Bs), Ys)))).
part(X, .(Y, Xs), .(Y, Ls), Bs) :- ','(less(X, Y), part(X, Xs, Ls, Bs)).
part(X, .(Y, Xs), Ls, .(Y, Bs)) :- part(X, Xs, Ls, Bs).
part(X, [], [], []).
app([], X, X).
app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs).
less(0, s(X)).
less(s(X), s(Y)) :- less(X, Y).

Queries:

qs(g,a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
qs_in: (b,f)
part_in: (b,b,f,f)
less_in: (b,b)
app_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

qs_in_ga([], []) → qs_out_ga([], [])
qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
less_in_gg(0, s(X)) → less_out_gg(0, s(X))
less_in_gg(s(X), s(Y)) → U9_gg(X, Y, less_in_gg(X, Y))
U9_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U7_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga([], X, X) → app_out_gga([], X, X)
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U8_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
U8_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
[]  =  []
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
less_in_gg(x1, x2)  =  less_in_gg(x1, x2)
0  =  0
s(x1)  =  s(x1)
less_out_gg(x1, x2)  =  less_out_gg
U9_gg(x1, x2, x3)  =  U9_gg(x3)
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x2, x6)
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x5)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

qs_in_ga([], []) → qs_out_ga([], [])
qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
less_in_gg(0, s(X)) → less_out_gg(0, s(X))
less_in_gg(s(X), s(Y)) → U9_gg(X, Y, less_in_gg(X, Y))
U9_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U7_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga([], X, X) → app_out_gga([], X, X)
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U8_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
U8_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
[]  =  []
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
less_in_gg(x1, x2)  =  less_in_gg(x1, x2)
0  =  0
s(x1)  =  s(x1)
less_out_gg(x1, x2)  =  less_out_gg
U9_gg(x1, x2, x3)  =  U9_gg(x3)
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x2, x6)
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x5)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

QS_IN_GA(.(X, Xs), Ys) → U1_GA(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
QS_IN_GA(.(X, Xs), Ys) → PART_IN_GGAA(X, Xs, Littles, Bigs)
PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → U5_GGAA(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → U9_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
U5_GGAA(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → U6_GGAA(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
U5_GGAA(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_GGAA(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → PART_IN_GGAA(X, Xs, Ls, Bs)
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_GA(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → QS_IN_GA(Littles, Ls)
U2_GA(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_GA(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U2_GA(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → QS_IN_GA(Bigs, Bs)
U3_GA(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_GA(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
U3_GA(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → APP_IN_GGA(Ls, .(X, Bs), Ys)
APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → U8_GGA(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_GGA(Xs, Ys, Zs)

The TRS R consists of the following rules:

qs_in_ga([], []) → qs_out_ga([], [])
qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
less_in_gg(0, s(X)) → less_out_gg(0, s(X))
less_in_gg(s(X), s(Y)) → U9_gg(X, Y, less_in_gg(X, Y))
U9_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U7_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga([], X, X) → app_out_gga([], X, X)
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U8_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
U8_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
[]  =  []
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
less_in_gg(x1, x2)  =  less_in_gg(x1, x2)
0  =  0
s(x1)  =  s(x1)
less_out_gg(x1, x2)  =  less_out_gg
U9_gg(x1, x2, x3)  =  U9_gg(x3)
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x2, x6)
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x5)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
QS_IN_GA(x1, x2)  =  QS_IN_GA(x1)
PART_IN_GGAA(x1, x2, x3, x4)  =  PART_IN_GGAA(x1, x2)
U6_GGAA(x1, x2, x3, x4, x5, x6)  =  U6_GGAA(x2, x6)
U5_GGAA(x1, x2, x3, x4, x5, x6)  =  U5_GGAA(x1, x2, x3, x6)
U7_GGAA(x1, x2, x3, x4, x5, x6)  =  U7_GGAA(x2, x6)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U8_GGA(x1, x2, x3, x4, x5)  =  U8_GGA(x1, x5)
LESS_IN_GG(x1, x2)  =  LESS_IN_GG(x1, x2)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x4, x5)
U4_GA(x1, x2, x3, x4)  =  U4_GA(x4)
U9_GG(x1, x2, x3)  =  U9_GG(x3)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x1, x4, x5)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

QS_IN_GA(.(X, Xs), Ys) → U1_GA(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
QS_IN_GA(.(X, Xs), Ys) → PART_IN_GGAA(X, Xs, Littles, Bigs)
PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → U5_GGAA(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → LESS_IN_GG(X, Y)
LESS_IN_GG(s(X), s(Y)) → U9_GG(X, Y, less_in_gg(X, Y))
LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)
U5_GGAA(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → U6_GGAA(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
U5_GGAA(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_GGAA(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → PART_IN_GGAA(X, Xs, Ls, Bs)
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_GA(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → QS_IN_GA(Littles, Ls)
U2_GA(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_GA(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U2_GA(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → QS_IN_GA(Bigs, Bs)
U3_GA(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_GA(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
U3_GA(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → APP_IN_GGA(Ls, .(X, Bs), Ys)
APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → U8_GGA(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_GGA(Xs, Ys, Zs)

The TRS R consists of the following rules:

qs_in_ga([], []) → qs_out_ga([], [])
qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
less_in_gg(0, s(X)) → less_out_gg(0, s(X))
less_in_gg(s(X), s(Y)) → U9_gg(X, Y, less_in_gg(X, Y))
U9_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U7_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga([], X, X) → app_out_gga([], X, X)
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U8_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
U8_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
[]  =  []
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
less_in_gg(x1, x2)  =  less_in_gg(x1, x2)
0  =  0
s(x1)  =  s(x1)
less_out_gg(x1, x2)  =  less_out_gg
U9_gg(x1, x2, x3)  =  U9_gg(x3)
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x2, x6)
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x5)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)
QS_IN_GA(x1, x2)  =  QS_IN_GA(x1)
PART_IN_GGAA(x1, x2, x3, x4)  =  PART_IN_GGAA(x1, x2)
U6_GGAA(x1, x2, x3, x4, x5, x6)  =  U6_GGAA(x2, x6)
U5_GGAA(x1, x2, x3, x4, x5, x6)  =  U5_GGAA(x1, x2, x3, x6)
U7_GGAA(x1, x2, x3, x4, x5, x6)  =  U7_GGAA(x2, x6)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U8_GGA(x1, x2, x3, x4, x5)  =  U8_GGA(x1, x5)
LESS_IN_GG(x1, x2)  =  LESS_IN_GG(x1, x2)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x4, x5)
U4_GA(x1, x2, x3, x4)  =  U4_GA(x4)
U9_GG(x1, x2, x3)  =  U9_GG(x3)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x1, x4, x5)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 4 SCCs with 9 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_GGA(Xs, Ys, Zs)

The TRS R consists of the following rules:

qs_in_ga([], []) → qs_out_ga([], [])
qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
less_in_gg(0, s(X)) → less_out_gg(0, s(X))
less_in_gg(s(X), s(Y)) → U9_gg(X, Y, less_in_gg(X, Y))
U9_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U7_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga([], X, X) → app_out_gga([], X, X)
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U8_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
U8_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
[]  =  []
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
less_in_gg(x1, x2)  =  less_in_gg(x1, x2)
0  =  0
s(x1)  =  s(x1)
less_out_gg(x1, x2)  =  less_out_gg
U9_gg(x1, x2, x3)  =  U9_gg(x3)
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x2, x6)
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x5)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

APP_IN_GGA(.(X, Xs), Ys, .(X, Zs)) → APP_IN_GGA(Xs, Ys, Zs)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APP_IN_GGA(x1, x2, x3)  =  APP_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

APP_IN_GGA(.(X, Xs), Ys) → APP_IN_GGA(Xs, Ys)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)

The TRS R consists of the following rules:

qs_in_ga([], []) → qs_out_ga([], [])
qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
less_in_gg(0, s(X)) → less_out_gg(0, s(X))
less_in_gg(s(X), s(Y)) → U9_gg(X, Y, less_in_gg(X, Y))
U9_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U7_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga([], X, X) → app_out_gga([], X, X)
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U8_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
U8_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
[]  =  []
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
less_in_gg(x1, x2)  =  less_in_gg(x1, x2)
0  =  0
s(x1)  =  s(x1)
less_out_gg(x1, x2)  =  less_out_gg
U9_gg(x1, x2, x3)  =  U9_gg(x3)
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x2, x6)
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x5)
LESS_IN_GG(x1, x2)  =  LESS_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

LESS_IN_GG(s(X), s(Y)) → LESS_IN_GG(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

U5_GGAA(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)
PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → U5_GGAA(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → PART_IN_GGAA(X, Xs, Ls, Bs)

The TRS R consists of the following rules:

qs_in_ga([], []) → qs_out_ga([], [])
qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
less_in_gg(0, s(X)) → less_out_gg(0, s(X))
less_in_gg(s(X), s(Y)) → U9_gg(X, Y, less_in_gg(X, Y))
U9_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U7_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga([], X, X) → app_out_gga([], X, X)
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U8_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
U8_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
[]  =  []
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
less_in_gg(x1, x2)  =  less_in_gg(x1, x2)
0  =  0
s(x1)  =  s(x1)
less_out_gg(x1, x2)  =  less_out_gg
U9_gg(x1, x2, x3)  =  U9_gg(x3)
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x2, x6)
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x5)
PART_IN_GGAA(x1, x2, x3, x4)  =  PART_IN_GGAA(x1, x2)
U5_GGAA(x1, x2, x3, x4, x5, x6)  =  U5_GGAA(x1, x2, x3, x6)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

U5_GGAA(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → PART_IN_GGAA(X, Xs, Ls, Bs)
PART_IN_GGAA(X, .(Y, Xs), .(Y, Ls), Bs) → U5_GGAA(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
PART_IN_GGAA(X, .(Y, Xs), Ls, .(Y, Bs)) → PART_IN_GGAA(X, Xs, Ls, Bs)

The TRS R consists of the following rules:

less_in_gg(0, s(X)) → less_out_gg(0, s(X))
less_in_gg(s(X), s(Y)) → U9_gg(X, Y, less_in_gg(X, Y))
U9_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
less_in_gg(x1, x2)  =  less_in_gg(x1, x2)
0  =  0
s(x1)  =  s(x1)
less_out_gg(x1, x2)  =  less_out_gg
U9_gg(x1, x2, x3)  =  U9_gg(x3)
PART_IN_GGAA(x1, x2, x3, x4)  =  PART_IN_GGAA(x1, x2)
U5_GGAA(x1, x2, x3, x4, x5, x6)  =  U5_GGAA(x1, x2, x3, x6)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

PART_IN_GGAA(X, .(Y, Xs)) → PART_IN_GGAA(X, Xs)
U5_GGAA(X, Y, Xs, less_out_gg) → PART_IN_GGAA(X, Xs)
PART_IN_GGAA(X, .(Y, Xs)) → U5_GGAA(X, Y, Xs, less_in_gg(X, Y))

The TRS R consists of the following rules:

less_in_gg(0, s(X)) → less_out_gg
less_in_gg(s(X), s(Y)) → U9_gg(less_in_gg(X, Y))
U9_gg(less_out_gg) → less_out_gg

The set Q consists of the following terms:

less_in_gg(x0, x1)
U9_gg(x0)

We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

QS_IN_GA(.(X, Xs), Ys) → U1_GA(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → QS_IN_GA(Littles, Ls)
U1_GA(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_GA(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U2_GA(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → QS_IN_GA(Bigs, Bs)

The TRS R consists of the following rules:

qs_in_ga([], []) → qs_out_ga([], [])
qs_in_ga(.(X, Xs), Ys) → U1_ga(X, Xs, Ys, part_in_ggaa(X, Xs, Littles, Bigs))
part_in_ggaa(X, .(Y, Xs), .(Y, Ls), Bs) → U5_ggaa(X, Y, Xs, Ls, Bs, less_in_gg(X, Y))
less_in_gg(0, s(X)) → less_out_gg(0, s(X))
less_in_gg(s(X), s(Y)) → U9_gg(X, Y, less_in_gg(X, Y))
U9_gg(X, Y, less_out_gg(X, Y)) → less_out_gg(s(X), s(Y))
U5_ggaa(X, Y, Xs, Ls, Bs, less_out_gg(X, Y)) → U6_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, .(Y, Xs), Ls, .(Y, Bs)) → U7_ggaa(X, Y, Xs, Ls, Bs, part_in_ggaa(X, Xs, Ls, Bs))
part_in_ggaa(X, [], [], []) → part_out_ggaa(X, [], [], [])
U7_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), Ls, .(Y, Bs))
U6_ggaa(X, Y, Xs, Ls, Bs, part_out_ggaa(X, Xs, Ls, Bs)) → part_out_ggaa(X, .(Y, Xs), .(Y, Ls), Bs)
U1_ga(X, Xs, Ys, part_out_ggaa(X, Xs, Littles, Bigs)) → U2_ga(X, Xs, Ys, Bigs, qs_in_ga(Littles, Ls))
U2_ga(X, Xs, Ys, Bigs, qs_out_ga(Littles, Ls)) → U3_ga(X, Xs, Ys, Ls, qs_in_ga(Bigs, Bs))
U3_ga(X, Xs, Ys, Ls, qs_out_ga(Bigs, Bs)) → U4_ga(X, Xs, Ys, app_in_gga(Ls, .(X, Bs), Ys))
app_in_gga([], X, X) → app_out_gga([], X, X)
app_in_gga(.(X, Xs), Ys, .(X, Zs)) → U8_gga(X, Xs, Ys, Zs, app_in_gga(Xs, Ys, Zs))
U8_gga(X, Xs, Ys, Zs, app_out_gga(Xs, Ys, Zs)) → app_out_gga(.(X, Xs), Ys, .(X, Zs))
U4_ga(X, Xs, Ys, app_out_gga(Ls, .(X, Bs), Ys)) → qs_out_ga(.(X, Xs), Ys)

The argument filtering Pi contains the following mapping:
qs_in_ga(x1, x2)  =  qs_in_ga(x1)
[]  =  []
qs_out_ga(x1, x2)  =  qs_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U1_ga(x1, x2, x3, x4)  =  U1_ga(x1, x4)
part_in_ggaa(x1, x2, x3, x4)  =  part_in_ggaa(x1, x2)
U5_ggaa(x1, x2, x3, x4, x5, x6)  =  U5_ggaa(x1, x2, x3, x6)
less_in_gg(x1, x2)  =  less_in_gg(x1, x2)
0  =  0
s(x1)  =  s(x1)
less_out_gg(x1, x2)  =  less_out_gg
U9_gg(x1, x2, x3)  =  U9_gg(x3)
U6_ggaa(x1, x2, x3, x4, x5, x6)  =  U6_ggaa(x2, x6)
U7_ggaa(x1, x2, x3, x4, x5, x6)  =  U7_ggaa(x2, x6)
part_out_ggaa(x1, x2, x3, x4)  =  part_out_ggaa(x3, x4)
U2_ga(x1, x2, x3, x4, x5)  =  U2_ga(x1, x4, x5)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x1, x4, x5)
U4_ga(x1, x2, x3, x4)  =  U4_ga(x4)
app_in_gga(x1, x2, x3)  =  app_in_gga(x1, x2)
app_out_gga(x1, x2, x3)  =  app_out_gga(x3)
U8_gga(x1, x2, x3, x4, x5)  =  U8_gga(x1, x5)
QS_IN_GA(x1, x2)  =  QS_IN_GA(x1)
U1_GA(x1, x2, x3, x4)  =  U1_GA(x1, x4)
U2_GA(x1, x2, x3, x4, x5)  =  U2_GA(x1, x4, x5)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
QDP
                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

QS_IN_GA(.(X, Xs)) → U1_GA(X, part_in_ggaa(X, Xs))
U2_GA(X, Bigs, qs_out_ga(Ls)) → QS_IN_GA(Bigs)
U1_GA(X, part_out_ggaa(Littles, Bigs)) → U2_GA(X, Bigs, qs_in_ga(Littles))
U1_GA(X, part_out_ggaa(Littles, Bigs)) → QS_IN_GA(Littles)

The TRS R consists of the following rules:

qs_in_ga([]) → qs_out_ga([])
qs_in_ga(.(X, Xs)) → U1_ga(X, part_in_ggaa(X, Xs))
part_in_ggaa(X, .(Y, Xs)) → U5_ggaa(X, Y, Xs, less_in_gg(X, Y))
less_in_gg(0, s(X)) → less_out_gg
less_in_gg(s(X), s(Y)) → U9_gg(less_in_gg(X, Y))
U9_gg(less_out_gg) → less_out_gg
U5_ggaa(X, Y, Xs, less_out_gg) → U6_ggaa(Y, part_in_ggaa(X, Xs))
part_in_ggaa(X, .(Y, Xs)) → U7_ggaa(Y, part_in_ggaa(X, Xs))
part_in_ggaa(X, []) → part_out_ggaa([], [])
U7_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(Ls, .(Y, Bs))
U6_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(.(Y, Ls), Bs)
U1_ga(X, part_out_ggaa(Littles, Bigs)) → U2_ga(X, Bigs, qs_in_ga(Littles))
U2_ga(X, Bigs, qs_out_ga(Ls)) → U3_ga(X, Ls, qs_in_ga(Bigs))
U3_ga(X, Ls, qs_out_ga(Bs)) → U4_ga(app_in_gga(Ls, .(X, Bs)))
app_in_gga([], X) → app_out_gga(X)
app_in_gga(.(X, Xs), Ys) → U8_gga(X, app_in_gga(Xs, Ys))
U8_gga(X, app_out_gga(Zs)) → app_out_gga(.(X, Zs))
U4_ga(app_out_gga(Ys)) → qs_out_ga(Ys)

The set Q consists of the following terms:

qs_in_ga(x0)
part_in_ggaa(x0, x1)
less_in_gg(x0, x1)
U9_gg(x0)
U5_ggaa(x0, x1, x2, x3)
U7_ggaa(x0, x1)
U6_ggaa(x0, x1)
U1_ga(x0, x1)
U2_ga(x0, x1, x2)
U3_ga(x0, x1, x2)
app_in_gga(x0, x1)
U8_gga(x0, x1)
U4_ga(x0)

We have to consider all (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


QS_IN_GA(.(X, Xs)) → U1_GA(X, part_in_ggaa(X, Xs))
The remaining pairs can at least be oriented weakly.

U2_GA(X, Bigs, qs_out_ga(Ls)) → QS_IN_GA(Bigs)
U1_GA(X, part_out_ggaa(Littles, Bigs)) → U2_GA(X, Bigs, qs_in_ga(Littles))
U1_GA(X, part_out_ggaa(Littles, Bigs)) → QS_IN_GA(Littles)
Used ordering: Polynomial interpretation [25]:

POL(.(x1, x2)) = 1 + x1 + x2   
POL(0) = 1   
POL(QS_IN_GA(x1)) = x1   
POL(U1_GA(x1, x2)) = x1 + x2   
POL(U1_ga(x1, x2)) = 0   
POL(U2_GA(x1, x2, x3)) = x2   
POL(U2_ga(x1, x2, x3)) = 0   
POL(U3_ga(x1, x2, x3)) = 0   
POL(U4_ga(x1)) = 0   
POL(U5_ggaa(x1, x2, x3, x4)) = 1 + x2 + x3   
POL(U6_ggaa(x1, x2)) = 1 + x1 + x2   
POL(U7_ggaa(x1, x2)) = 1 + x1 + x2   
POL(U8_gga(x1, x2)) = 0   
POL(U9_gg(x1)) = 1 + x1   
POL([]) = 0   
POL(app_in_gga(x1, x2)) = 0   
POL(app_out_gga(x1)) = 0   
POL(less_in_gg(x1, x2)) = x1   
POL(less_out_gg) = 1   
POL(part_in_ggaa(x1, x2)) = x2   
POL(part_out_ggaa(x1, x2)) = x1 + x2   
POL(qs_in_ga(x1)) = 0   
POL(qs_out_ga(x1)) = 0   
POL(s(x1)) = 1 + x1   

The following usable rules [17] were oriented:

U7_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(Ls, .(Y, Bs))
part_in_ggaa(X, []) → part_out_ggaa([], [])
part_in_ggaa(X, .(Y, Xs)) → U7_ggaa(Y, part_in_ggaa(X, Xs))
U5_ggaa(X, Y, Xs, less_out_gg) → U6_ggaa(Y, part_in_ggaa(X, Xs))
part_in_ggaa(X, .(Y, Xs)) → U5_ggaa(X, Y, Xs, less_in_gg(X, Y))
U6_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(.(Y, Ls), Bs)



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ PiDPToQDPProof
                  ↳ QDP
                    ↳ QDPOrderProof
QDP
                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

U2_GA(X, Bigs, qs_out_ga(Ls)) → QS_IN_GA(Bigs)
U1_GA(X, part_out_ggaa(Littles, Bigs)) → U2_GA(X, Bigs, qs_in_ga(Littles))
U1_GA(X, part_out_ggaa(Littles, Bigs)) → QS_IN_GA(Littles)

The TRS R consists of the following rules:

qs_in_ga([]) → qs_out_ga([])
qs_in_ga(.(X, Xs)) → U1_ga(X, part_in_ggaa(X, Xs))
part_in_ggaa(X, .(Y, Xs)) → U5_ggaa(X, Y, Xs, less_in_gg(X, Y))
less_in_gg(0, s(X)) → less_out_gg
less_in_gg(s(X), s(Y)) → U9_gg(less_in_gg(X, Y))
U9_gg(less_out_gg) → less_out_gg
U5_ggaa(X, Y, Xs, less_out_gg) → U6_ggaa(Y, part_in_ggaa(X, Xs))
part_in_ggaa(X, .(Y, Xs)) → U7_ggaa(Y, part_in_ggaa(X, Xs))
part_in_ggaa(X, []) → part_out_ggaa([], [])
U7_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(Ls, .(Y, Bs))
U6_ggaa(Y, part_out_ggaa(Ls, Bs)) → part_out_ggaa(.(Y, Ls), Bs)
U1_ga(X, part_out_ggaa(Littles, Bigs)) → U2_ga(X, Bigs, qs_in_ga(Littles))
U2_ga(X, Bigs, qs_out_ga(Ls)) → U3_ga(X, Ls, qs_in_ga(Bigs))
U3_ga(X, Ls, qs_out_ga(Bs)) → U4_ga(app_in_gga(Ls, .(X, Bs)))
app_in_gga([], X) → app_out_gga(X)
app_in_gga(.(X, Xs), Ys) → U8_gga(X, app_in_gga(Xs, Ys))
U8_gga(X, app_out_gga(Zs)) → app_out_gga(.(X, Zs))
U4_ga(app_out_gga(Ys)) → qs_out_ga(Ys)

The set Q consists of the following terms:

qs_in_ga(x0)
part_in_ggaa(x0, x1)
less_in_gg(x0, x1)
U9_gg(x0)
U5_ggaa(x0, x1, x2, x3)
U7_ggaa(x0, x1)
U6_ggaa(x0, x1)
U1_ga(x0, x1)
U2_ga(x0, x1, x2)
U3_ga(x0, x1, x2)
app_in_gga(x0, x1)
U8_gga(x0, x1)
U4_ga(x0)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 3 less nodes.